<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>预约通知</title>
    <link rel="stylesheet" href="../css/page-health-orderNotice.css" />
    <script src="../plugins/jquery/dist/jquery.min.js"></script>
    <script src="../plugins/healthmobile.js"></script>
    <script src="../plugins/vue/vue.js"></script>
    <script src="../plugins/vue/axios-0.18.0.js"></script>
    <script src="../../../../../health_mobile_web/src/main/webapp/plugins/qrcode.min.js"></script>
</head>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div id="app" class="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">传智健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <div class="contentBox">
        <div class="paysuccess" style="height: 1000px">
            <div class="success">
                <h3 class="successimg" align="center"><img src="../../../../../health_mobile_web/src/main/webapp/img/payfail.jpg"></h3>
                <div class="paydetail">
                    <h2 align="center">支付时间超时，将为您取消预约!</h2>
                    <div class="countCircle" >
                        <h3>将在{{countdown}}秒后，跳转至首页...</h3>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>

</body>

<script>
    let price = getUrlParam("price");
    let vue=new Vue({
        el:"#app",
        data:{
            price:price,
            countdown:'5',
            timer: null,
        },
        created(){
            this.sendCode()
        },
        methods: {
            //倒计时
            sendCode() {
                this.loading();  //启动定时器
                this.timer = setInterval(() => {
                    //创建定时器
                    if (this.countdown === 1) {
                        this.clearTimer();  //关闭定时器
                        this.skipStep();
                    } else {
                        this.loading();
                    }
                }, 1000);
            },
            loading() {
                //启动定时器
                this.countdown--;  //定时器减1
            },
            clearTimer() {
                //清除定时器
                clearInterval(this.timer);
                this.timer = null;

            },
            skipStep(){
                window.location.href ="index.html"
            }
        }
    })
</script>
</html>